﻿using System;
using System.Collections.Generic;

namespace WholeSlideImageViewer
{
    internal class TextPropertiesDialogViewModel : ViewModelBase
    {
        private IEnumerable<TextPropertiesDialogPropertyItem> _properties;

        public IEnumerable<TextPropertiesDialogPropertyItem> Properties => _properties;

        [Obsolete("Only use this constructor in design time.", true)]
        public TextPropertiesDialogViewModel()
        {
            _properties = new TextPropertiesDialogPropertyItem[]
            {
                new TextPropertiesDialogPropertyItem("名称1", "值1"),
                new TextPropertiesDialogPropertyItem("名称2", "值2")
            };
        }

        public TextPropertiesDialogViewModel(IEnumerable<TextPropertiesDialogPropertyItem> properties)
        {
            _properties = properties;
        }
    }

    internal class TextPropertiesDialogPropertyItem
    {
        public TextPropertiesDialogPropertyItem(string name, string value)
        {
            Name = name;
            Value = value;
        }

        public string? Name { get; set; }
        public string? Value { get; set; }
    }
}
